<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
    <h:head>
        <title>Perfiles</title>
    </h:head>
    <h:body>
        <p:growl id="msgPerfiles" showDetail="true" 
                     life="7000" autoUpdate="true"/>
        <h:panelGrid style="margin: 0 auto">
            <p:outputLabel value="ADMINISTRACI&Oacute;N DE PERFILES" style="color: #2480BC; font-weight: bold; font-size: 1.3em;"/>
        </h:panelGrid>
        
        <h:form >
            
            <p:tabView dynamic="true" activeIndex="0" id="tabViewUser">
            
                <p:tab title="Perfiles" disabled="false" > 
                    <center><p:outputLabel value="Selecci&oacute;n de Perfiles" style="color: #2480BC; font-size: 1.1em"/></center>
                    
                    <p:dataTable id="dataTableProfiles" var="perfil" 
                                    value="#{profileBean.tableModel}"
                                    paginator="true" rows="8"
                                    paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" 
                                    rowsPerPageTemplate="6,8,10,12"
                                    selection="#{profileBean.selectedProfile}"
                                    selectionMode="single"
                                    rowKey="#{perfil.profile}"
                                    >
                            <p:column headerText="Perfil">  
                                <h:outputText value="#{perfil.profile}" />  
                            </p:column>  

                            <p:column headerText="Nombre del recurso" style="text-align: center">  
                                <h:outputText value="#{perfil.resourceName}" />
                            </p:column>  
                            
                            <p:column headerText="Recurso" style="text-align: center">  
                                <h:outputText value="#{perfil.resource}" />
                            </p:column>
                        
                            <p:column headerText="Nombre del recurso" style="text-align: center">  
                                <h:outputText value="#{perfil.limit}" />
                            </p:column>
                        
                            
                        </p:dataTable> 
                    
                </p:tab>
                
                <p:tab title="Crear" disabled="false" > 
                    <ui:include src="createProfile.xhtml"/>
                </p:tab>
                
                <p:tab title="Modificar" disabled="false" > 
                    <ui:include src="editProfile.xhtml" />
                </p:tab>
                
            </p:tabView>
                
        </h:form>
        
    </h:body>
</html>
